package cn.enilu.flash.mobile.controller;

import cn.enilu.flash.bean.vo.front.Rets;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HYF
 * @ClassName TestController
 * @date 2022年05月09日 5:59 下午
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    @Qualifier("redis")
    private RedisTemplate redisTemplate;

    @RequestMapping("redis")
    public Object redis(String key,String value) {
        redisTemplate.opsForValue().set(key,value);

        return Rets.success(redisTemplate.opsForValue().get(key));
    }
}
